package com.ruoyi.factory.erp.service.impl;

import com.alibaba.fastjson.JSON;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.factory.erp.domain.ErporgInfo;
import com.ruoyi.factory.erp.mapper.ErporgMapper;
import com.ruoyi.factory.erp.service.ErpStandapiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Service
public class ErpStandapiServiceImpl implements ErpStandapiService {

    @Autowired
    public ErporgMapper erporgMapper;

    @Override
    public AjaxResult getOrgDept(String req, HttpServletRequest request){
        ErporgInfo erporgInfo = JSON.parseObject(req, ErporgInfo.class);
        List<ErporgInfo> selectalldepts = erporgMapper.selectalldepts(erporgInfo);
        return new AjaxResult(200,"success",selectalldepts);
    }

}
